Parse error: expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in ..?
Posted
by myaccount
on Stack Overflow
See other posts from Stack Overflow
or by myaccount
Published on 2010-04-29T20:22:53Z
Indexed on
2010/04/29
20:27 UTC
Read the original article
Hit count: 197
I tried to put an if statement inside an echo but this parse error came up, is it not possible to do that? should I use heredoc instead?
echo "<input name='main_branch' type='radio' value='1' <?php if($restaurant['main_branch'] == 1) { echo "checked"; } ?> />Yes
<input name='main_branch' type='radio' value='0' <?php if($restaurant['main_branch'] == 0) { echo " checked"; } ?> />No";
© Stack Overflow or respective owner